package _543cloud_new;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.PriorityQueue;



public class Graph_Multi extends Graph{
	
	PriorityQueue<Left_node> l_queue = new PriorityQueue<>(QUEUELENGTH, new lcompare());
	//lnodes, rnodes record that if the node is still current.
	
	
	public Graph_Multi() throws IOException{
		super("src/_543cloud_new/capacity.txt","src/_543cloud_new/relation.txt");
		init();
	}
		
	public void init(){
		Iterator<Left_node> temp_i = this.lnode_queue.iterator();
		while(temp_i.hasNext()){
			l_queue.add(temp_i.next());
		}
	}
	
	public class lcompare implements Comparator<Left_node> {
		public int compare(Left_node x, Left_node y) {
			if (x.cap < y.cap)
				return 1;
			if (x.cap > y.cap)
				return -1;
			return 0;
		}
	}
	
	

	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try {
			Graph_Multi test= new Graph_Multi();
			PriorityQueue<Left_node> test_queue = test.l_queue;
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
